import requests
import re
from util.headers import get_header

url = "https://www.4399.com/"
res = requests.get(url, headers=get_header())
html_data = res.content.decode("gbk")
# print(html_data)
img_datas = re.findall(
    r' <li>.*?<a href="(.*?)">.*?<img alt="(.*?)" lzimg="1" lz_src="(.*?)">(.*?)</a></li>',
    html_data,
    re.S,
)
# print(img_datas)

for data in img_datas:
    print(data)
